<?php
namespace app\admin\logic;

use think\facade\Request;
use think\facade\View;

class Order
{
    public static function orderWhere()
    {
        $where=[];
        $one = input('');
        if (\request()->param('startaddtime')!='' && \request()->param('endaddtime')!=''){

            $where['startaddtime']=\request()->param('startaddtime');
            $where['endaddtime']=\request()->param('endaddtime');

        }



        if ( $posts = Request::param('order_status')){
            $where['order_status']=$posts;
            View::assign('post',$posts);
        }

        ;
        if ($all = Request::param('order_sn')){
            $where['order_sn']=$all;
            View::assign('all',$all);
        }


        if (\request()->param('maxprice')!=''){
//            $where['price']=request()->param('maxprice');
            $where['maxprice']=\request()->param('maxprice');
        }
        if (\request()->param('minprice')!=''){
//            $where['price']=\request()->param('minprice');
            $where['minprice']=\request()->param('minprice');
        }

        return [
            'where'=>$where,
            'one'=>$one
        ];
    }
}